<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改审核入库单')" />
    <style>
        [v-cloak] {
            display: none;
        }
        .deer-cell {
            border-color: #d3dce6;
            height: 46px;
            border-style: solid;
            z-index: 200000;
            text-align: center;
        }
        .deer-cell .deer-cell-title {
            line-height: 44px;
            font-weight: bold;
            color: #99a9bf;
            width: auto;
        }
        .deer-cell .el-input--suffix .el-input__inner {
            padding: 0 3px;
            text-align: center;
        }
        .deer-cell .el-date-editor.el-input, .deer-cell .el-date-editor.el-input__inner {
            width: auto;
        }
        .deer-cell .el-input{
            color:  #99a9bf;
        }
        .el-input__prefix{
            display: none;
        }
        .main .el-input__inner {
            height: 42px!important;
            line-height: 42px!important;
            padding: 0!important;
            text-align: center!important;
        }
        .main .el-input-number {
            line-height: 40px!important;
        }
        .el-input.is-disabled .el-input__inner {
            color: #606266!important;
        }
    </style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-billInMaster-edit">
        <input id="billId" name="billId" type="hidden" v-model="billMasters.billId">
        <div class="form-group">
            <label class="col-sm-2 control-label">单据号：</label>
            <div class="col-sm-8">
                <input id="billNo" name="billNo" class="form-control" type="text" v-model="billMasters.billNo" disabled="true">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">仓库：</label>
            <div class="col-sm-8">
                <select id="wareId" name="wareId" class="form-control" v-model="billMasters.wareId" :disabled="audit">
                    <template v-for="(item, index) in wares" :key="index">
                        <option v-if="item.wareId == billMasters.wareId" selected="selected" :value="item.wareId" v-cloak>{{item.wareName}}</option>
                        <option v-else :value="item.wareId" v-cloak>{{item.wareName}}</option>
                    </template>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">入库类型：</label>
            <div class="col-sm-8">
                <select id="type" name="type" class="form-control" v-model="billMasters.type" :disabled="audit" @change="changeType">
                    <option v-for="(item, index) in inTypes" :key="index" :value="item.dictValue" v-cloak>{{item.dictLabel}}</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注：</label>
            <div class="col-sm-8">
                <input id="memo" name="memo" class="form-control" type="text" v-model="billMasters.memo" :disabled="audit">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">操作人员：</label>
            <div class="col-sm-8">
                <input id="createUserName" name="createUserName" class="form-control" type="text" v-model="billMasters.createUserName" :disabled="audit">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">物料详情：</label>
            <div class="col-sm-10 main">
                <el-row>
                    <el-col :span="3" class="deer-cell" v-show="false">
                        <span class="deer-cell-title">ID</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 100px">
                        <span class="deer-cell-title">物料编码</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 180px">
                        <span class="deer-cell-title">物料名称</span>
                    </el-col>
                    <el-col :span="3" class="deer-cell" v-show="false">
                        <span class="deer-cell-title">型号</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 140px">
                        <span class="deer-cell-title">生产日期</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 135px">
                        <span class="deer-cell-title">批次</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 100px" v-show="billMasters.type == 2">
                        <span class="deer-cell-title">暂存区数量</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 185px">
                        <span class="deer-cell-title">计划总数</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 80px" v-show="billMasters.type != 2">
                        <span class="deer-cell-title">行号</span>
                    </el-col>
                    <el-col class="deer-cell" style="width: 100px" v-show="billMasters.type != 2">
                        <span class="deer-cell-title">本次入库</span>
                    </el-col>
                    <el-col style="width: 125px;line-height: 48px" v-if="!audit">
                        <el-button style="margin-left: 15px" @click="addDetail()" type="success" icon="el-icon-plus" circle ></el-button>
                    </el-col>
                </el-row>

                <div :style="billDetails.length >= 6 ? 'height: 240px;overflow: auto' : ''">
                    <el-row v-for="(detail, index) in billDetails" :key="index">
                        <el-col :span="3" class="deer-cell" v-show="false">
                            <el-input :disabled="true" v-model="detail.itemId"></el-input>
                        </el-col>
                        <el-col class="deer-cell" style="width: 100px">
                            <el-input :disabled="true" v-model="detail.itemCode"></el-input>
                        </el-col>
                        <el-col class="deer-cell" style="width: 180px">
                            <el-input :disabled="true" v-model="detail.itemName"></el-input>
                        </el-col>
                        <el-col :span="3" class="deer-cell" v-show="false">
                            <el-input :disabled="true" v-model="detail.model"></el-input>
                        </el-col>
                        <el-col class="deer-cell" style="width: 140px">
                            <el-date-picker
                                    :disabled="detail.changeState || billMasters.type == 2"
                                    v-model="detail.pdTime"
                                    type="date"
                                    format="yyyy 年 MM 月 dd 日"
                                    value-format="yyyy-MM-dd"
                                    :clearable="false"
                                    placeholder="选择日期">
                            </el-date-picker>
                        </el-col>
                        <el-col class="deer-cell" style="width: 135px">
                            <el-select v-model="detail.batch" placeholder="选择批次" :disabled="detail.changeState || billMasters.type == 2">
                                <template v-for="(item, index) in batchs" :key="index">
                                    <el-option v-if="item.batchName == detail.batch" selected="selected" :label="item.batchName" :value="item.batchName"></el-option>
                                    <el-option v-else :label="item.batchName" :value="item.batchName"></el-option>
                                </template>
                            </el-select>
                        </el-col>
                        <el-col class="deer-cell" style="width: 100px" v-show="billMasters.type == 2">
                            <el-input v-model="detail.areaQuantity" :disabled="true"></el-input>
                        </el-col>
                        <el-col class="deer-cell" style="width: 185px">
                            <el-input-number v-model="detail.quantity" :min="1" :max="1000000" :disabled="detail.changeState"></el-input-number>
                        </el-col>
                        <el-col class="deer-cell" style="width: 80px" v-show="billMasters.type != 2">
                            <el-input :disabled="true" v-model="detail.distributionNum"></el-input>
                        </el-col>
                        <el-col class="deer-cell" style="width: 100px" v-show="billMasters.type != 2">
                            <el-input v-model="detail.benCiRuKu" type="number" :min="1" :disabled="detail.lineState"></el-input>
                        </el-col>
                        <el-col style="width: 125px;line-height: 48px" v-if="!audit">
                            <el-button style="margin-left: 15px" v-if="detail.lineState" @click="appendLine(index)" type="success" icon="el-icon-plus" circle></el-button>
                            <el-button style="margin-left: 15px" @click="removeDetail(index)" type="danger" icon="el-icon-delete" circle ></el-button>
                        </el-col>
                    </el-row>
                </div>
            </div>
        </div>
        <div class="form-group" v-if="audit">
            <label class="col-sm-2 control-label">确认审核：</label>
            <div class="col-sm-3">
                <select id="state" name="state" class="form-control" v-model="billMasters.state">
                    <option value="1">审核未通过</option>
                    <option value="2">审核通过</option>
                </select>
            </div>
        </div>
    </form>

    <el-divider content-position="left" style="margin-bottom: 20px"></el-divider>
    <div style="text-align: center">
        <el-button type="primary" @click="save()">保存</el-button>
        <el-button type="info" @click="closeModal()">返回</el-button>
    </div>

    <el-dialog title="物料列表" width="60%" :visible.sync="dialogTableVisible" :append-to-body="true">
        <el-row>
            <el-col :span="24">
                <el-form style="margin-left: 10px" :inline="true" :model="item.param" class="demo-form-inline">
                    <el-form-item size="mini" label="关键字">
                        <el-input size="mini" v-model="item.param.keyWords" placeholder="关键字"></el-input>
                    </el-form-item>
                    <el-form-item size="mini">
                        <el-button size="mini" type="primary" @click="getItems()">查询</el-button>
                    </el-form-item>
                </el-form>
                <el-table border size="small" ref="multipleTable" height="315" @selection-change="handleSelectionChange" :data="item.list">
                    <el-table-column type="selection" width="55"></el-table-column>
                    <el-table-column property="itemId" label="ID" v-if="false"></el-table-column>
                    <el-table-column property="itemCode" label="物料编码"></el-table-column>
                    <el-table-column property="itemName" label="物料名称"></el-table-column>
                    <el-table-column property="model" label="型号" v-if="billMasters.type != 2"></el-table-column>
                    <el-table-column property="pd" label="生产日期" v-if="billMasters.type == 2"></el-table-column>
                    <el-table-column property="batch" label="批次" v-if="billMasters.type == 2"></el-table-column>
                    <el-table-column property="quantity" label="暂存区数量" v-if="billMasters.type == 2"></el-table-column>
                </el-table>
                <el-pagination
                        @current-change="chengCurrentPage"
                        :current-page="item.currentPage"
                        :page-size="item.pageSize"
                        layout="prev, pager, next"
                        :total="item.total">
                </el-pagination>
            </el-col>
        </el-row>
        <el-row style="margin-top: 10px;text-align: center">
            <el-button size="mini" type="primary" @click="commitItems()">确定</el-button>
            <el-button size="mini" type="info" @click="toggleSelection()">取消</el-button>
        </el-row>
    </el-dialog>
</div>
<div th:include="include::footer"></div>
<script th:inline="javascript">
    var prefix = ctx + "in/billInMaster";

    let billMasters = [[${billInMaster}]];
    let audits = [[${audit}]];

    var app = new Vue({
        el: '.wrapper',
        data: {
            wares: [],
            batchs: [],
            billDetails: [],
            billMasters: billMasters,
            dialogTableVisible: false,
            item: {
                currentPage: 1,
                pageSize: 6,
                total: '',
                param: {
                    keyWords: ''
                },
                list: [],
                selectItems: []
            },
            itemId: '',
            audit: audits,
            inTypes: []
        },
        methods: {
            //关闭此页面
            closeModal: function(){
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            },
            //取消选择
            toggleSelection(){
                this.$refs.multipleTable.clearSelection();
                this.dialogTableVisible = false;
                this.selectItems = [];
            },
            //选择
            handleSelectionChange(items){
                this.selectItems = items;
            },
            //物料列表确定按钮
            commitItems: function(){
                var billDetails = this.billDetails;
                if(this.billMasters.type != 2){
                    this.selectItems.forEach(item => {
                        var detail = {
                            itemId: item.itemId,
                            itemCode: item.itemCode,
                            itemName: item.itemName,
                            model: item.model,
                            pdTime: '',
                            batch: '',
                            quantity: '',
                            distributionNum: '',
                            benCiRuKu: '',
                            lineState: true
                        };
                        var flag = true;
                        billDetails.forEach(detail => {
                            if(detail.itemCode == item.itemCode){
                                flag = false;
                            }
                        });
                        if(flag){
                            this.billDetails.push(detail);
                        }
                    });
                }else{
                    this.selectItems.forEach(item => {
                        var detail = {
                            itemId: item.itemId,
                            itemCode: item.itemCode,
                            itemName: item.itemName,
                            model: item.model,
                            pdTime: item.pd,
                            batch: item.batch,
                            areaQuantity: item.quantity,
                            quantity: '',
                            distributionNum: '',
                            benCiRuKu: '',
                            lineState: false
                        };
                        var flag = true;
                        billDetails.forEach(detail => {
                            if(detail.itemCode == item.itemCode && detail.pdTime == item.pd && detail.batch == item.batch){
                                flag = false;
                            }
                        });
                        if(flag){
                            this.billDetails.push(detail);
                        }
                    });
                }
                this.toggleSelection();
            },
            //添加入库详情
            addDetail: function(){
                this.dialogTableVisible = true;
                this.getItems();
            },
            //添加行号
            appendLine(index){
                var detail = this.billDetails[index];
                if(detail.pdTime == ''){
                    $.modal.alertError("请选择生产日期！！");
                    return;
                }else{
                    if(detail.batch == ''){
                        $.modal.alertError("请选择批次！！");
                        return;
                    }else{
                        var arr = [];
                        for(var i = 0; i < this.billDetails.length; i++){
                            if(this.billDetails[i].itemCode == detail.itemCode){
                                arr.push(this.billDetails[i]);
                            }
                        }
                        var distributionNum;
                        if(arr.length == 1){
                            distributionNum = 1;
                        }else{
                            distributionNum = parseInt(arr[1].distributionNum) + 1;
                        }
                        var line = {
                            itemId: detail.itemId,
                            itemCode: detail.itemCode,
                            itemName: detail.itemName,
                            model: detail.model,
                            pdTime: detail.pdTime,
                            batch: detail.batch,
                            quantity: detail.quantity,
                            distributionNum: distributionNum,
                            benCiRuKu: '',
                            lineState: false,
                            changeState: true
                        };
                        this.billDetails.splice(index + 1, 0, line);
                        detail.changeState = true;
                    }
                }
            },
            //删除物料详情
            removeDetail: function(index){
                var billDetails = this.billDetails;
                if(billDetails[index].lineState){
                    var arr = [];
                    for(var j = 0; j < billDetails.length; j++){
                        if(billDetails[j].itemCode == billDetails[index].itemCode){
                            arr.push(billDetails[j]);
                        }
                    }
                    billDetails.splice(index, arr.length);
                }else{
                    billDetails.splice(index, 1);
                }
            },
            //保存提交
            save: function(){
                var that = this;
                if(that.audit){
                    $.ajax({
                        cache: true,
                        type: "POST",
                        url: "/in/billInMaster/edit",
                        data: JSON.stringify({
                            billInMaster: that.billMasters,
                            billInDetailList: that.billDetails
                        }),
                        dataType: "json",
                        contentType: "application/json;charset-UTF-8",
                        async: false,
                        error: function(request){
                            $.modal.alertError("系统错误");
                        },
                        success: function(data){
                            if(data.code == web_status.SUCCESS){
                                $.modal.msgReload(data.msg, "success")
                            }else if(data.code == web_status.WARNING){
                                $.modal.alertWarning(data.msg)
                            }else{
                                $.modal.alertError(data.msg);
                            }
                        }
                    });
                }else{
                    if(this.billDetails.length == 0){
                        $.modal.alertError('请选择入库物料');
                        return;
                    }else{
                        var billDetails = this.billDetails;
                        var checkLength = 0;
                        if(this.billMasters.type != 2){
                            for(var j = 0; j < billDetails.length; j++){
                                if(billDetails[j].pdTime == ''){
                                    $.modal.alertError("请选择生产日期！！");
                                    return;
                                }else{
                                    if(billDetails[j].batch == ''){
                                        $.modal.alertError("请选择批次！！");
                                        return;
                                    }else{
                                        checkLength += 1;
                                    }
                                }
                            }
                            if(billDetails.length == checkLength){
                                var arr = [];
                                for(var x = 0; x < billDetails.length; x++){
                                    if(arr.indexOf(billDetails[x].itemCode) == -1){
                                        arr.push(billDetails[x].itemCode);
                                    }
                                }
                                var ajaxLength = 0;
                                var ajaxArr = [];
                                for(var v = 0; v < arr.length; v++){
                                    var newArr = [];
                                    for(var y = 0; y < billDetails.length; y++){
                                        if(billDetails[y].itemCode == arr[v]){
                                            newArr.push(billDetails[y]);
                                        }
                                    }
                                    if(newArr.length == 1){
                                        ajaxLength += 1;
                                        ajaxArr.push(newArr[0]);
                                    }else if(newArr.length > 1){
                                        newArr.shift();
                                        var num = 0;
                                        for(var m = 0; m < newArr.length; m++){
                                            if(newArr[m].benCiRuKu == ''){
                                                $.modal.alertError("请输入本次入库数量！！");
                                                return;
                                            }else{
                                                if(newArr[m].benCiRuKu > newArr[m].quantity){
                                                    $.modal.alertError('"' + newArr[m].itemName + '" 的入库数量超出计划总数！！');
                                                    return;
                                                }else{
                                                    if(newArr.length == 1){
                                                        num = newArr[0].benCiRuKu;
                                                    }else{
                                                        num += parseInt(newArr[m].benCiRuKu);
                                                    }
                                                }
                                            }
                                        }
                                        if(num > newArr[0].quantity){
                                            $.modal.alertError('"' + newArr[0].itemName + '" 的入库数量超出计划总数！！');
                                            return;
                                        }else{
                                            ajaxLength += 1;
                                            for(var o = 0; o < newArr.length; o++){
                                                ajaxArr.push(newArr[o]);
                                            }
                                        }
                                    }
                                }
                                if(ajaxLength == arr.length){
                                    $.ajax({
                                        cache: true,
                                        type: "POST",
                                        url: "/in/billInMaster/edit",
                                        data: JSON.stringify({
                                            billInMaster: that.billMasters,
                                            billInDetailList: ajaxArr
                                        }),
                                        dataType: "json",
                                        contentType: "application/json;charset-UTF-8",
                                        async: false,
                                        error: function(request){
                                            $.modal.alertError("系统错误");
                                        },
                                        success: function(data){
                                            if(data.code == web_status.SUCCESS){
                                                $.modal.msgReload(data.msg, "success")
                                            }else if(data.code == web_status.WARNING){
                                                $.modal.alertWarning(data.msg)
                                            }else{
                                                $.modal.alertError(data.msg);
                                            }
                                        }
                                    });
                                }
                            }
                        }else{
                            for(var s = 0; s < billDetails.length; s++){
                                if(billDetails[s].quantity > billDetails[s].areaQuantity){
                                    $.modal.alertError('"' + billDetails[s].itemName + '" 的计划总数超出暂存区数量！！');
                                    return;
                                }else{
                                    checkLength += 1;
                                }
                            }
                            if(checkLength == billDetails.length){
                                $.ajax({
                                    cache: true,
                                    type: "POST",
                                    url: "/in/billInMaster/edit",
                                    data: JSON.stringify({
                                        billInMaster: that.billMasters,
                                        billInDetailList: billDetails
                                    }),
                                    dataType: "json",
                                    contentType: "application/json;charset-UTF-8",
                                    async: false,
                                    error: function(request){
                                        $.modal.alertError("系统错误");
                                    },
                                    success: function(data){
                                        if(data.code == web_status.SUCCESS){
                                            $.modal.msgReload(data.msg, "success")
                                        }else if(data.code == web_status.WARNING){
                                            $.modal.alertWarning(data.msg)
                                        }else{
                                            $.modal.alertError(data.msg);
                                        }
                                    }
                                });
                            }
                        }
                    }
                }
            },
            //获取仓库列表
            getWares: function(){
                var that = this;
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "/system/wareInfo/list",
                    data: {},
                    async: false,
                    error: function(result){
                        $.modal.alertError("系统错误" + result.msg);
                    },
                    success: function(data){
                        that.wares = data.rows;
                    }
                });
            },
            //获取批次列表
            getBatchs: function(){
                var that = this;
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "/boxItembacth/findList",
                    data: {},
                    async: false,
                    error: function(request){
                        $.modal.alertError("系统错误");
                    },
                    success: function(data){
                        that.batchs = data.rows;
                    }
                });
            },
            //获取入库类型列表
            getInTypes: function(){
                var that = this;
                $.ajax({
                    cache: true,
                    url: '/system/dict/data/list',
                    type: 'POST',
                    data: {
                        dictType: 'put_goods_type'
                    },
                    async: false,
                    error: function(request){
                        $.modal.alertError("系统错误");
                    },
                    success: function(data){
                        that.inTypes = data.rows;
                    }
                })
            },
            //获取物料列表
            getItems: function(){
                var that = this;
                var item = that.item;
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: "/system/itemInfo/findList",
                    data: {
                        keyWords: item.param.keyWords,
                        pageSize: item.pageSize,
                        pageNum: item.currentPage,
                        type: that.billMasters.type
                    },
                    async: false,
                    error: function(request){
                        $.modal.alertError("系统错误");
                    },
                    success: function(data){
                        var msg = data.rows;
                        for(var i = 0; i < msg.length; i++){
                            if(msg[i].pd != null){
                                msg[i].pd = msg[i].pd.slice(0, 10);
                            }
                        }
                        that.item.list = msg;
                        that.item.total = data.total;
                    }
                });
            },
            //物料列表分页
            chengCurrentPage: function(currentPage){
                this.item.currentPage  = currentPage;
                this.getItems();
            },
            //获取入库单选择的物料
            getCheckItem(){
                var that = this;
                $.ajax({
                    url: "/in/billInDetail/findBillInDetailListByBillId",
                    type: "POST",
                    data: {
                        billId: that.billMasters.billId
                    },
                    success: function(data){
                        var data = data.rows;
                        var msg = [];
                        if(that.audit){
                            msg = data;
                            for(var i = 0; i < msg.length; i++){
                                msg[i].lineState = that.audit;
                                msg[i].changeState = that.audit;
                            }
                        }else{
                            if(that.billMasters.type != 2){
                                var oldArr = [];
                                for(var x = 0; x < data.length; x++){
                                    if(oldArr.indexOf(data[x].itemCode) == -1){
                                        oldArr.push(data[x].itemCode)
                                    }
                                }
                                for(var j = 0; j < oldArr.length; j++){
                                    var arr = [];
                                    for(var k = 0; k < data.length; k++){
                                        if(data[k].itemCode == oldArr[j]){
                                            arr.push(data[k]);
                                        }
                                    }
                                    if(arr.length == 1){
                                        if(arr[0].distributionNum != '' && arr[0].benCiRuKu != ''){
                                            var detail = {
                                                itemId: arr[0].itemId,
                                                itemCode: arr[0].itemCode,
                                                itemName: arr[0].itemName,
                                                model: arr[0].model,
                                                pdTime: arr[0].pdTime,
                                                batch: arr[0].batch,
                                                quantity: arr[0].quantity,
                                                distributionNum: null,
                                                benCiRuKu: null,
                                                lineState: true,
                                                changeState: true
                                            };
                                            arr.unshift(detail);
                                            for(var o = 0; o < arr.length; o++){
                                                msg.push(arr[o]);
                                            }
                                        }else{
                                            msg.push(arr[0]);
                                        }
                                    }else if(arr.length > 1){
                                        var detail = {
                                            itemId: arr[0].itemId,
                                            itemCode: arr[0].itemCode,
                                            itemName: arr[0].itemName,
                                            model: arr[0].model,
                                            pdTime: arr[0].pdTime,
                                            batch: arr[0].batch,
                                            quantity: arr[0].quantity,
                                            distributionNum: null,
                                            benCiRuKu: null,
                                            lineState: true,
                                            changeState: true
                                        };
                                        arr.unshift(detail);
                                        for(var o = 0; o < arr.length; o++){
                                            msg.push(arr[o]);
                                        }
                                    }
                                }
                                for(var a = 0; a < msg.length; a++){
                                    if(msg[a].lineState == null && msg[a].changeState == null){
                                        if(msg[a].distributionNum == '' && msg[a].benCiRuKu == null){
                                            msg[a].lineState = true;
                                            msg[a].changeState = false;
                                        }else{
                                            msg[a].lineState = false;
                                            msg[a].changeState = true;
                                        }
                                    }
                                }
                            }else{
                                msg = data;
                                for(var h = 0; h < msg.length; h++){
                                    if(msg[h].lineState == null && msg[h].changeState == null){
                                        msg[h].lineState = false;
                                        msg[h].changeState = false;
                                    }
                                }
                            }
                        }
                        that.billDetails = msg;
                    }
                })
            },
            //入库类型更改
            changeType: function(){
                this.billDetails = [];
            }
        },
        created(){
            this.getWares();
            this.getInTypes();
            this.getBatchs();
            this.getCheckItem();
        }
    })
</script>
</body>
</html>
